﻿@model Bonobo.Git.Server.Models.ForgotPasswordModel

@{
    ViewBag.Title =  Resources.Home_ForgotPassword_Title;
}

<h1>@Resources.Home_ForgotPassword_Title</h1>


@using (Html.BeginForm("ForgotPassword", "Home", FormMethod.Post, new { @class = "pure-form pure-form-aligned" }))
{
    @Html.ValidationSummary(false, Resources.Home_ForgotPassword_Failed)
    
    @Html.AntiForgeryToken()
    <fieldset>
        <div class="pure-control-group">
            @Html.LabelFor(m => m.Username)
            @Html.TextBoxFor(m => m.Username, new { autofocus = "" })<em>*</em>
            @Html.ValidationMessageFor(m => m.Username)
        </div> 

        <div class="pure-controls">
            <button type="submit" class="pure-button pure-button-primary">@Resources.Home_ForgotPassword_ForgotPassword</button>
        </div>
    </fieldset>
}

@if (TempData["SendSuccess"] != null)
{
    if ((bool)TempData["SendSuccess"])
    {
        <div class="summary-success">
            <p>@Resources.Home_ForgotPassword_EmailSuccess</p>
        </div>
    }
    else
    {
        <div class="summary-error">
            <p>@Resources.Home_ForgotPassword_EmailError</p>
        </div>
    }
}